<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul{
            list-style: none;
        }
        .done{
            text-decoration: line-through;
            opacity: .5;
        }
    </style>
</head>
<body>
    
    <div id="app">
        <ul>
            <li v-for='item in todos' :class="{done: item.done}">
                {{item.text}}===={{item.done}}
            </li>

            <!-- <li v-for='item in todos' :style="{ 'text-decoration': 'line-through' }">
                {{item.text}}===={{item.done}}
            </li>
            <li v-for='item in todos' :style="{ 'textDecoration': 'line-through' }">
                {{item.text}}===={{item.done}}
            </li> -->

            <li v-for='item in todos' :style="item.done ? current : ''">
                {{item.text}}===={{item.done}}
            </li>
        </ul>
    </div>

    <script src="../lib/Vue/vue.js"></script>
    <script>

        var vm = new Vue({
            el: '#app',
            data: {
                todos: [
                    {
                        text: '逛超市',
                        done: false
                    },
                    {
                        text: '打篮球',
                        done: true
                    },
                    {
                        text: '学习vue',
                        done: false
                    },
                    {
                        text: '看电影',
                        done: true
                    },
                ],
                current: {
                    'text-decoration': 'line-through',
                    'opacity': '.5'
                }
            }
        })
    </script>
</body>
</html>